package com.clgk.wechatmall.common.constants;

import com.clgk.wechatmall.common.Response;

public enum ErrorConstants {
	
	SYSTEM_ERROR(1,"系统错误"),
	
	USER_ALREADY_EXIST(2,"用户已存在"),
	
	VERIFY_ERROR(3,"验证码错误"),
	
	/**
	 * 验证码过期
	 */
	VERIFY_OUTTIME(4,"验证码过期"),
	
	/**
	 * 手机号码不能为空
	 */
	PHONE_IS_NULL(5,"手机号码不能为空"),
	
	NO_POWER(6,"没有权限"),
	
	;
	
	private ErrorConstants(Integer retCode,String message){
		this.retCode=retCode;
		this.message = message;
	}
	
	
	public static void setResponse(Response<?> response,ErrorConstants error){
		response.setRetCode(error.retCode);
		response.setMessage(error.message);
	}
	
	
	
	private Integer retCode;
	
	private String message;

	
}